<script type="text/javascript">
$(function(){
	$("#username").focus();
	$('#logform').form({ 
		success:function(data){
			var data = runJson(data);
			if(data.status == 0){
				alert( data.info );
			   	return false;
			}else{
			   redirect('{:UU("nyi/yi/index")}');
			}
		}   
	}); 
});
</script>
<div id="loginBox">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><div class="loginBox_l"></div></td>
    <td valign="top">
    <div class="loginBox_m">
    <div style="padding-left:10px;">登录</div>
    <div class="closeWin" style="float:right; margin-right:8px;"><a href="javascript:;" onClick="window.close()"></a></div>
    <div class="logCon">
	<form id="logform" action="{:U('Home/Index/toLogin')}&ajax=true" method="post">
    <span>用户名: </span><input name="username" id="username" type="text" size="30" required="true" class="uinput" validType="length[1,20]"/><br />
    <span>密　码: </span><input name="password" id="password" type="password" size="30" required="true" class="uinput" validType="length[1,20]"/><br />
    <span>验证码: </span><input name="imgcode" id="imgcode" type="text" size="15" class="uinput" />
    <img src="{:U('Home/Index/verify')}" id="captcha" width="52" height="24" /><a href="javascript:;" onclick="javascript:$('#captcha').attr('src', '{:U('Home/Index/verify')}&random='+Math.random())">看不清？换一个</a><br />
    <input type="submit" class="submit" value="登录" /> <a href="javascript:;" onClick="window.close()" class="undo">取消</a>
    </form>
    </div>
	</div>
    </td>
    <td valign="top"><div class="loginBox_r"></div></td>
  </tr>
</table>
</div>
<!--[if IE 6]>
<script type="text/javascript">
  DD_belatedPNG.fix('.loginBox_l,.loginBox_r,.loginBox_m,.logo2');
</script>
<![endif]-->
